Type TrackPlayerBuilderStrategyFactory

	Global firstFactory:TrackPlayerBuilderStrategyFactory

	Field nextFactory:TrackPlayerBuilderStrategyFactory

	Function Fetch:TrackPlayerBuilderStrategy(name:String)
		Local factory:TrackPlayerBuilderStrategyFactory=TrackPlayerBuilderStrategyFactory.firstFactory
		While factory
			Local strategy:TrackPlayerBuilderStrategy = factory.CreateStrategy(name)
			If strategy Then
				Return strategy
			End If
			factory = factory.nextFactory
		Wend		
	End Function
	
	Method New()
		nextFactory = TrackPlayerBuilderStrategyFactory.firstFactory
		TrackPlayerBuilderStrategyFactory.firstFactory = Self
	End Method

	Method CreateStrategy:TrackPlayerBuilderStrategy(name:String)
		Local n:String = name.ToLower()
		Select n
			Case "process"
				Return New TrackPlayerBuilderProcessStrategy
			Default
				Return Null
		End Select
	End Method

End Type
New TrackPlayerBuilderStrategyFactory